/**
 * 等号左右两侧遵循模式匹配原则就是结构
 */

// let [a,b,c,d,e] =[1,2,3,4,5];
// console.log(a,b,c,d,e);

//let{name,age,foo}={name:'zhangsan', age:22, foo:'bar'};
//
//console.log(name,age,foo);
//console.log(a,b,c);

/**
 * 拓展运算符 用到右侧就是展开
 */
let obj ={
    name:"larry",
    weight:'20kg',
    gender:'male'
};
let obj1 ={...obj};
console.log(obj1);